package com.kygl.teacher.util;

import com.kygl.teacher.vo.Teacher;

public class ProTitleStateFactory {
	public ProTitleState getProTitleIns(Teacher t){
		int kind = t.getKind();
		int rank = t.getRank();
		if(kind != 1)return null;
		if(rank > 10)
		{
			return new AssistantState(kind, rank);
		}
		else if(rank > 7)
		{
			return new LecturerState(kind, rank);
		}
		else if(rank > 4)
		{
			return new AssociateProState(kind, rank);
		}
		else if(rank >= 2)
		{
			return new ProfessorState(kind, rank);
		}
		
		return null;
	}
}
